home *** CD-ROM | disk | FTP | other *** search
- /* Demo - to get amount of words in a file */
-
- BAREED_HOST = GetClip('BAREED')
-
- IF BAREED_HOST = '' THEN DO
- CALL SetClip('BAREED') /* Remove from ClipNode */
- EXIT 5
- END
-
- ADDRESS VALUE BAREED_HOST
-
- CALL SetClip('BAREED') /* Remove from ClipNode */
-
- OPTIONS RESULTS
-
- /* ---------------------- MAIN --------------------- */
-
- count = 0
-
- move cursor archiveend
-
- posy = 1
- newy = 0
-
- do while newy < posy
-
- 'find previous word'
- fault = rc
-
- if fault ~= 0 then do
- get cursor y
- posy = result
-
- move cursor left
-
- get cursor y
- newy = result
-
- end
-
- if fault = 0 then
- count = count + 1
-
- end
-
- tell "Counted" count "word- and number strings"
-